HAL FDCAN I/O operation functions migration

This section provides information about the HAL FDCAN function migration.

HAL FDCAN configures FDCAN message filters.

HAL1

HAL2

HAL_FDCAN_ConfigFilter(FDCAN_HandleTypeDef *hfdcan,
                       const FDCAN_FilterTypeDef *sFilterConfig)
HAL_FDCAN_SetFilter(const hal_fdcan_handle_t *hfdcan,
                    const hal_fdcan_filter_t *p_filter_config)

HAL FDCAN configures global filtering options.

HAL1

HAL2

HAL_FDCAN_ConfigGlobalFilter(&hfdcan,
                             FDCAN_ACCEPT_IN_RX_FIFO0,
                             FDCAN_ACCEPT_IN_RX_FIFO1,
                             FDCAN_FILTER_REMOTE,
                             FDCAN_FILTER_REMOTE);
hal_fdcan_global_filter_config_t global_filter_conf = {
      HAL_FDCAN_NO_MATCH_TO_RX_FIFO_0,
      HAL_FDCAN_NO_MATCH_TO_RX_FIFO_1,
      HAL_FDCAN_REMOTE_ACCEPT,
      HAL_FDCAN_REMOTE_ACCEPT};

HAL_FDCAN_SetGlobalFilter(&hfdcan, &global_filter_conf);

HAL FDCAN configures interrupt lines for FDCAN.

In HAL1, FDCAN interrupt lines are configured using a single function, HAL_FDCAN_ConfigInterruptLines(), which assigns either grouped or individual interrupts to an interrupt line (line 0 and/or line 1) depending on the availability of interrupt grouping in the STM32 device.

In HAL2, this configuration is split into two functions: HAL_FDCAN_SetInterruptGroupsToLine() for assigning grouped interrupts, and HAL_FDCAN_SetInterruptsToLine() for assigning individual interrupts. For more details, please refer to Use case: Communication in interrupt mode

Interrupt grouping feature

HAL1

HAL2

Available

HAL_FDCAN_ConfigInterruptLines(&hfdcan, FDCAN_IT_GROUP_SMSG, FDCAN_INTERRUPT_LINE0);
HAL_FDCAN_SetInterruptGroupsToLine(&hfdcan, HAL_FDCAN_IT_GROUP_STATUS_MSG, HAL_FDCAN_IT_LINE_0);

Not Available

HAL_FDCAN_ConfigInterruptLines(&hfdcan, FDCAN_IT_TX_COMPLETE, FDCAN_INTERRUPT_LINE0);
HAL_FDCAN_SetInterruptsToLine(&hfdcan, HAL_FDCAN_IT_TX_COMPLETE, HAL_FDCAN_IT_LINE_0);

HAL FDCAN enables interrupt notifications.

  • In HAL1, the function HAL_FDCAN_ActivateNotification() enables specific FDCAN interrupt notifications in a single call, activating both the requested interrupts and the corresponding interrupt line(s) (line 0 and/or line 1) to which they are assigned.

  • In HAL2, interrupt management is designed to be more granular and modular: HAL_FDCAN_EnableInterruptLines() is used to activate the interrupt lines, while HAL_FDCAN_EnableInterrupts() enables the interrupt sources.

    For transmit complete interrupts such as FDCAN_IT_TX_COMPLETE, the dedicated function HAL_FDCAN_EnableTxBufferCompleteInterrupts() must also be called to enable the corresponding buffer interrupts. for more details see Use case: Communication in interrupt mode.

    Similarly, for transmit abort interrupts like FDCAN_IT_TX_ABORT_COMPLETE, the function HAL_FDCAN_EnableTxBufferCancellationInterrupts() must also be called to enable the related buffer cancellation interrupts. for more details see Use case: Interrupt cancellation.

    Additionally, HAL_FDCAN_CCU_EnableInterrupts() is provided to enable clock calibration unit interrupts for more details see Use case: Clock calibration (interrupt).

HAL1

HAL2

HAL_FDCAN_ActivateNotification(hfdcan, FDCAN_IT_RX_FIFO0_NEW_MESSAGE, FDCAN_TX_BUFFER0);
HAL_FDCAN_EnableInterrupts(&hfdcan, HAL_FDCAN_IT_RX_FIFO_0_NEW_MSG);
HAL_FDCAN_EnableInterruptLines(&hfdcan, HAL_FDCAN_IT_LINE_0);
HAL_FDCAN_ActivateNotification(hfdcan, FDCAN_IT_TX_COMPLETE, FDCAN_TX_BUFFER0);
HAL_FDCAN_EnableInterrupts(&hfdcan, HAL_FDCAN_IT_TX_COMPLETE);
HAL_FDCAN_EnableTxBufferCompleteInterrupts(&hfdcan, HAL_FDCAN_IT_TX_CPLT_BUFFER_0);
HAL_FDCAN_EnableInterruptLines(&hfdcan, HAL_FDCAN_IT_LINE_0);
HAL_FDCAN_ActivateNotification(hfdcan, FDCAN_IT_TX_ABORT_COMPLETE, FDCAN_TX_BUFFER0);
HAL_FDCAN_EnableInterrupts(&hfdcan, HAL_FDCAN_IT_TX_ABORT_COMPLETE);
HAL_FDCAN_EnableTxBufferCancellationInterrupts(&hfdcan, HAL_FDCAN_IT_TX_ABORT_BUFFER_0);
HAL_FDCAN_EnableInterruptLines(&hfdcan, HAL_FDCAN_IT_LINE_0);
HAL_FDCAN_ActivateNotification(hfdcan, FDCAN_IT_CALIB_STATE_CHANGED, FDCAN_TX_BUFFER0);
HAL_FDCAN_CCU_EnableInterrupts(&hfdcan, HAL_FDCAN_CCU_IT_CALIBRATION_STATE_CHANGE);

HAL FDCAN disables interrupt notifications.

  • In HAL1, the function HAL_FDCAN_DeactivateNotification() disables specific FDCAN interrupt notifications in a single call, deactivating both the requested interrupts and their associated interrupt line(s).

  • In HAL2, interrupt management is designed to be more granular and modular: HAL_FDCAN_DisableInterruptLines() is used to deactivate the interrupt lines, while HAL_FDCAN_DisableInterrupts() disables the interrupt sources.

    For transmit complete interrupts such as HAL_FDCAN_IT_TX_CPLT_BUFFER_0, the dedicated function HAL_FDCAN_DisableTxBufferCompleteInterrupts() must also be called.

    Similarly, for transmit abort interrupts like HAL_FDCAN_IT_TX_ABORT_BUFFER_0, the function HAL_FDCAN_DisableTxBufferCancellationInterrupts() must also be called.

    Additionally, HAL_FDCAN_CCU_DisableInterrupts() is provided to disable clock calibration unit interrupts.

HAL1

HAL2

HAL_FDCAN_DeactivateNotification(hfdcan, FDCAN_IT_RX_FIFO0_NEW_MESSAGE);
HAL_FDCAN_DisableInterrupts(&hfdcan, HAL_FDCAN_IT_RX_FIFO_0_NEW_MSG);
HAL_FDCAN_DisableInterruptLines(&hfdcan, HAL_FDCAN_IT_LINE_0);
HAL_FDCAN_DeactivateNotification(hfdcan, FDCAN_IT_TX_COMPLETE);
HAL_FDCAN_DisableInterrupts(&hfdcan, HAL_FDCAN_IT_TX_COMPLETE);
HAL_FDCAN_DisableTxBufferCompleteInterrupts(&hfdcan, HAL_FDCAN_IT_TX_CPLT_BUFFER_0);
HAL_FDCAN_DisableInterruptLines(&hfdcan, HAL_FDCAN_IT_LINE_0);
HAL_FDCAN_DeactivateNotification(hfdcan, FDCAN_IT_TX_ABORT_COMPLETE, FDCAN_TX_BUFFER0);
HAL_FDCAN_DisableInterrupts(&hfdcan, HAL_FDCAN_IT_TX_ABORT_COMPLETE);
HAL_FDCAN_DisableTxBufferCancellationInterrupts(&hfdcan, HAL_FDCAN_IT_TX_ABORT_BUFFER_0);
HAL_FDCAN_DisableInterruptLines(&hfdcan, HAL_FDCAN_IT_LINE_0);
HAL_FDCAN_DeactivateNotification(hfdcan, FDCAN_IT_CALIB_STATE_CHANGED, FDCAN_TX_BUFFER0);
HAL_FDCAN_CCU_DisableInterrupts(&hfdcan, HAL_FDCAN_CCU_IT_CALIBRATION_STATE_CHANGE);

HAL FDCAN add message to tx buffer

HAL1

HAL2

HAL_FDCAN_AddMessageToTxBuffer(FDCAN_HandleTypeDef *hfdcan,
                               const FDCAN_TxHeaderTypeDef *pTxHeader,
                               const uint8_t *pTxData,
                               uint32_t BufferIndex)
HAL_FDCAN_FillMessageToBuffer(hal_fdcan_handle_t *hfdcan,
                              const hal_fdcan_tx_header_t *p_tx_header,
                              const uint8_t *p_tx_data,
                              uint32_t tx_buffer_index)

HAL FDCAN adds a message to the transmit FIFO queue.

HAL1

HAL2

HAL_FDCAN_AddMessageToTxFifoQ(FDCAN_HandleTypeDef *hfdcan,
                              const FDCAN_TxHeaderTypeDef *pTxHeader,
                              const uint8_t *pTxData)
HAL_FDCAN_ReqTransmitMsgFromFIFOQ(hal_fdcan_handle_t *hfdcan,
                                  const hal_fdcan_tx_header_t *p_tx_element_header,
                                  const uint8_t *p_tx_data)

HAL FDCAN aborts a pending transmission request.

HAL1

HAL2

HAL_FDCAN_AbortTxRequest(FDCAN_HandleTypeDef *hfdcan,
                         uint32_t BufferIndex)
HAL_FDCAN_ReqAbortOfTxBuffer(const hal_fdcan_handle_t *hfdcan,
                             uint32_t buffer_index)

HAL FDCAN configures the clock calibration.

  • In HAL1, clock calibration is configured using a single function, HAL_FDCAN_ConfigClockCalibration().

  • In HAL2, configuration is split: HAL_FDCAN_CCU_SetClockRouting() enables or bypasses calibration, HAL_FDCAN_CCU_SetConfigCalibrationUnit() sets calibration parameters, and HAL_FDCAN_SetClockDivider() explicitly sets the clock divider when calibration is bypassed.

Refer to Use case: Clock calibration (polling)

HAL1

HAL2

FDCAN_ClkCalUnitTypeDef ccu_config = {
  .TimeQuantaPerBitTime = 16,
  .CalFieldLength       = FDCAN_CALIB_FIELD_LENGTH_32,
  .MinOscClkPeriods     = 0x10,
  .WatchdogStartValue   = 0xFFFF,

  .ClockCalibration     = FDCAN_CLOCK_CALIBRATION_ENABLE,

  .ClockDivider         = FDCAN_CKDIV_DIV1

};

HAL_FDCAN_ConfigClockCalibration(&hfdcan, &ccu_config);
hal_fdcan_ccu_config_t ccu_config = {
  .time_quanta_per_bit_time   = 16,
  .calibration_field_length   = HAL_FDCAN_CCU_FIELD_LENGTH_32,
  .min_osc_clk_periods        = 0x10,
  .watchdog_start_value       = 0xFFFF
};
hal_fdcan_ccu_clock_route_t clock_route = HAL_FDCAN_CCU_CLOCK_ROUTE_CALIBRATION;
HAL_FDCAN_CCU_SetClockRouting(&hfdcan, clock_route);
/* Clock calibration is enabled, the ClockDivider value has no effect */



HAL_FDCAN_CCU_SetConfigCalibrationUnit(&hfdcan, &ccu_config);
FDCAN_ClkCalUnitTypeDef ccu_config = {
  .ClockCalibration     = FDCAN_CLOCK_CALIBRATION_DISABLE,
  .ClockDivider         = FDCAN_CKDIV_DIV2
};

HAL_FDCAN_ConfigClockCalibration(&hfdcan, &ccu_config);
/* */
hal_fdcan_ccu_clock_route_t clock_route = HAL_FDCAN_CCU_CLOCK_ROUTE_BYPASS;
hal_fdcan_clock_divider_t clock_divider = HAL_FDCAN_CLOCK_DIV_2;


HAL_FDCAN_CCU_SetClockRouting(&hfdcan, clock_route);
HAL_FDCAN_SetClockDivider(&hfdcan, clock_divider);

HAL FDCAN configures the extended ID mask for filtering.

HAL1

HAL2

HAL_FDCAN_ConfigExtendedIdMask(FDCAN_HandleTypeDef *hfdcan,
                               uint32_t Mask)
HAL_FDCAN_SetExtendedIdMask(const hal_fdcan_handle_t *hfdcan,
                            uint32_t mask)

HAL FDCAN configures the FIFO watermark level.

HAL1

HAL2

HAL_FDCAN_ConfigFifoWatermark(FDCAN_HandleTypeDef *hfdcan,
                              uint32_t FIFO,
                              uint32_t Watermark)
HAL_FDCAN_SetFifoWatermark(hal_fdcan_handle_t *hfdcan,
                           hal_fdcan_watermark_fifo_t fifo_sel,
                           uint32_t watermark_level)

HAL FDCAN configures RAM watchdog.

HAL1

HAL2

HAL_FDCAN_ConfigRamWatchdog(FDCAN_HandleTypeDef *hfdcan,
                            uint32_t CounterStartValue)
HAL_FDCAN_SetRamWatchdog(const hal_fdcan_handle_t *hfdcan,
                         uint8_t counter_start_value)

HAL FDCAN configures RX FIFO overwrite behavior.

HAL1

HAL2

HAL_FDCAN_ConfigRxFifoOverwrite(FDCAN_HandleTypeDef *hfdcan,
                                uint32_t RxFifo,
                                uint32_t OperationMode)
HAL_FDCAN_SetRxFifoOverwrite(const hal_fdcan_handle_t *hfdcan,
                             hal_fdcan_rx_location_t rx_fifo_idx,
                             hal_fdcan_rx_fifo_mode_t operation_mode)

HAL FDCAN configures the timeout counter.

HAL1

HAL2

/* */
uint32_t timeout_operation = FDCAN_TIMEOUT_CONTINUOUS;
uint32_t timeout_period    = 0x1000;


HAL_FDCAN_ConfigTimeoutCounter(&hfdcan, timeout_operation, timeout_period);
hal_fdcan_timeout_config_t timeout_config = {
               .timeout_operation = HAL_FDCAN_TIMEOUT_CONTINUOUS,
               .timeout_period    = 0x1000
             };

HAL_FDCAN_SetConfigTimeoutCounter(&hfdcan, &timeout_config);

HAL FDCAN configures and disable the timestamp counter.

  • In HAL1, the FDCAN timestamp counter is enabled and configured using two separate functions: HAL_FDCAN_EnableTimestampCounter() to activate the counter with a specified source, and HAL_FDCAN_ConfigTimestampCounter() to set the prescaler. Disabling the timestamp counter is performed with HAL_FDCAN_DisableTimestampCounter().

  • In HAL2, both enabling and disabling the timestamp counter are consolidated into a single function, HAL_FDCAN_SetConfigTimestampCounter(), which accepts a configuration structure specifying the timestamp source and prescaler. To disable the timestamp counter, the source is set to HAL_FDCAN_TIMESTAMP_SOURCE_ZERO.

HAL1

HAL2

/* */
HAL_FDCAN_EnableTimestampCounter(&hfdcan, FDCAN_TIMESTAMP_INTERNAL);
HAL_FDCAN_ConfigTimestampCounter(&hfdcan, FDCAN_TIMESTAMP_PRESC_10);
hal_fdcan_timestamp_config_t timestamp_config = {
    .timestamp_source    = HAL_FDCAN_TIMESTAMP_SOURCE_INTERNAL,
    .timestamp_prescaler = HAL_FDCAN_TIMESTAMP_PRESC_10 };
HAL_FDCAN_SetConfigTimestampCounter(&hfdcan, &timestamp_config);
HAL_FDCAN_DisableTimestampCounter(&fdcan)
timestamp_config = (hal_fdcan_timestamp_config_t){ HAL_FDCAN_TIMESTAMP_SOURCE_ZERO,
                                                   HAL_FDCAN_TIMESTAMP_PRESC_1};

HAL_FDCAN_SetConfigTimestampCounter(&fdcan, &timestamp_config);

HAL FDCAN configures transmit delay compensation.

HAL1

HAL2

/* */
uint32_t tx_delay_comp_offset = 5;
uint32_t tx_delay_comp_win_length = 0;
HAL_FDCAN_ConfigTxDelayCompensation(&fdcan, tx_delay_comp_offset,tx_delay_comp_win_length);
hal_fdcan_tx_delay_comp_config_t tx_delay_param = {
    .tx_delay_comp_offset     = 5,
    .tx_delay_comp_win_length = 0};
HAL_FDCAN_SetConfigTxDelayCompensation(&fdcan, &tx_delay_param);

HAL FDCAN disables edge filtering.

HAL1

HAL2

HAL_FDCAN_DisableEdgeFiltering(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_DisableEdgeFiltering(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN disables ISO mode.

HAL1

HAL2

HAL_FDCAN_DisableISOMode(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_DisableISOMode(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN disables the timeout counter.

HAL1

HAL2

HAL_FDCAN_DisableTimeoutCounter(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_DisableTimeoutCounter(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN disables transmit delay compensation.

HAL1

HAL2

HAL_FDCAN_DisableTxDelayCompensation(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_DisableTxDelayCompensation(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN enables edge filtering.

HAL1

HAL2

HAL_FDCAN_EnableEdgeFiltering(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_EnableEdgeFiltering(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN enables ISO mode.

HAL1

HAL2

HAL_FDCAN_EnableISOMode(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_EnableISOMode(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN enables the timeout counter.

HAL1

HAL2

HAL_FDCAN_EnableTimeoutCounter(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_EnableTimeoutCounter(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN enables transmission buffer request.

HAL1

HAL2

HAL_FDCAN_EnableTxBufferRequest(FDCAN_HandleTypeDef *hfdcan,
                                uint32_t BufferIndex)
HAL_FDCAN_ReqTransmitMsgFromBuffer(hal_fdcan_handle_t *hfdcan,
                                   uint32_t tx_buffer_index)

HAL FDCAN enables transmit delay compensation.

HAL1

HAL2

HAL_FDCAN_EnableTxDelayCompensation(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_EnableTxDelayCompensation(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN enter power down mode.

HAL1

HAL2

HAL_FDCAN_EnterPowerDownMode(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_EnterPowerDownMode(hal_fdcan_handle_t *hfdcan)

HAL FDCAN exits power down mode.

HAL1

HAL2

HAL_FDCAN_ExitPowerDownMode(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_ExitPowerDownMode(hal_fdcan_handle_t *hfdcan)

HAL FDCAN exits restricted operation mode.

HAL1

HAL2

HAL_FDCAN_ExitRestrictedOperationMode(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_DisableRestrictedOperationMode(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN gets the clock calibration counter value.

HAL1

HAL2

HAL_FDCAN_GetClockCalibrationCounter(const FDCAN_HandleTypeDef *hfdcan,
                                     uint32_t Counter)
HAL_FDCAN_CCU_GetCalibrationCounter(const hal_fdcan_handle_t *hfdcan,
                                    hal_fdcan_ccu_counter_source_t counter)

HAL FDCAN gets the current state of clock calibration.

  • In HAL1, checking the FDCAN clock calibration status involved multiple steps: polling the calibration state change flag using __HAL_FDCAN_GET_FLAG(), retrieving the calibration state with HAL_FDCAN_GetClockCalibrationState(), and manually clearing the flag using __HAL_FDCAN_CLEAR_FLAG().

  • In HAL2, this sequence is simplified into a single function, HAL_FDCAN_CCU_GetCalibrationLevelAndClearFlag(), which both reads the current calibration level and clears the calibration state change flag internally, streamlining the process.

Refer to Use case: Clock calibration (polling) for more details.

HAL1

HAL2

HAL_FDCAN_GetClockCalibrationState(const FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_CCU_GetCalibrationLevelAndClearFlag(const hal_fdcan_handle_t *hfdcan, uint32_t timeout_ms)

HAL FDCAN retrieves error counters.

HAL1

HAL2

HAL_FDCAN_GetErrorCounters(const FDCAN_HandleTypeDef *hfdcan,
                           FDCAN_ErrorCountersTypeDef *ErrorCounters)
HAL_FDCAN_GetErrorCounters(const hal_fdcan_handle_t *hfdcan,
                           hal_fdcan_error_counters_t *p_error_counters)

HAL FDCAN gets status of high priority messages.

HAL1

HAL2

HAL_FDCAN_GetHighPriorityMessageStatus(const FDCAN_HandleTypeDef *hfdcan,
                                       FDCAN_HpMsgStatusTypeDef *HpMsgStatus)
HAL_FDCAN_GetHighPriorityMessageStatus(const hal_fdcan_handle_t *hfdcan,
                                       hal_fdcan_high_prio_msg_status_t *p_hp_msg_status)

HAL FDCAN gets latest TX FIFO queue request buffer.

HAL1

HAL2

HAL_FDCAN_GetLatestTxFifoQRequestBuffer(const FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_GetLatestTxFifoQRequestBuffer(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN retrieves protocol status.

HAL1

HAL2

HAL_FDCAN_GetProtocolStatus(const FDCAN_HandleTypeDef *hfdcan,
                            FDCAN_ProtocolStatusTypeDef *ProtocolStatus)
HAL_FDCAN_GetProtocolStatus(const hal_fdcan_handle_t *hfdcan,
                            hal_fdcan_protocol_status_t *p_protocol_status)

HAL FDCAN gets the fill level of RX FIFO.

HAL1

HAL2

HAL_FDCAN_GetRxFifoFillLevel(const FDCAN_HandleTypeDef *hfdcan,
                             uint32_t RxFifo)
HAL_FDCAN_GetRxFifoFillLevel(const hal_fdcan_handle_t *hfdcan,
                             hal_fdcan_rx_location_t rx_fifo_sel,
                             uint32_t *p_fill_level)

HAL FDCAN retrieves a message from RX FIFO.

HAL1

HAL2

HAL_FDCAN_GetRxMessage(FDCAN_HandleTypeDef *hfdcan,
                       uint32_t RxLocation,
                       FDCAN_RxHeaderTypeDef *pRxHeader,
                       uint8_t *pRxData)
HAL_FDCAN_GetReceivedMessage(const hal_fdcan_handle_t *hfdcan,
                             hal_fdcan_rx_location_t rx_location,
                             hal_fdcan_rx_header_t *p_rx_header,
                             uint8_t *p_rx_data)

HAL FDCAN gets the timeout counter value.

HAL1

HAL2

HAL_FDCAN_GetTimeoutCounter(const FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_GetTimeoutCounter(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN gets the timestamp counter value.

HAL1

HAL2

HAL_FDCAN_GetTimestampCounter(const FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_GetTimeoutCounter(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN gets the TX event information.

HAL1

HAL2

HAL_FDCAN_GetTxEvent(FDCAN_HandleTypeDef *hfdcan,
                     FDCAN_TxEventFifoTypeDef *pTxEvent)
HAL_FDCAN_GetTxEvent(const hal_fdcan_handle_t *hfdcan,
                     hal_fdcan_tx_evt_fifo_header_t *p_tx_event)

HAL FDCAN gets the free level of TX FIFO.

HAL1

HAL2

HAL_FDCAN_GetTxFifoFreeLevel(const FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_GetTxFifoFreeLevel(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN checks if in restricted operation mode.

HAL1

HAL2

HAL_FDCAN_IsRestrictedOperationMode(const FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_IsEnabledRestrictedOperationMode(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN checks if a message is available in the RX buffer.

HAL1

HAL2

HAL_FDCAN_IsRxBufferMessageAvailable(FDCAN_HandleTypeDef *hfdcan,
                                     uint32_t RxBufferIndex)
HAL_FDCAN_GetRxBufferMessageStatusAndClearFlag(hal_fdcan_handle_t *hfdcan,
                                               hal_fdcan_rx_location_t rx_buffer_index)

HAL FDCAN checks if TX buffer message is pending.

HAL1

HAL2

HAL_FDCAN_IsTxBufferMessagePending(const FDCAN_HandleTypeDef *hfdcan,
                                   uint32_t TxBufferIndex)
HAL_FDCAN_GetTxBufferMessageStatus(const hal_fdcan_handle_t *hfdcan,
                                   uint32_t tx_buffer_index)

HAL FDCAN resets the clock calibration state.

HAL1

HAL2

HAL_FDCAN_ResetClockCalibrationState(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_CCU_Reset(hal_fdcan_handle_t *hfdcan)

HAL FDCAN resets the timeout counter.

HAL1

HAL2

HAL_FDCAN_ResetTimeoutCounter(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_ResetTimeoutCounter(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN resets the timestamp counter.

HAL1

HAL2

HAL_FDCAN_ResetTimestampCounter(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_ResetTimestampCounter(const hal_fdcan_handle_t *hfdcan)

HAL FDCAN start.

HAL1

HAL2

HAL_FDCAN_Start(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_Start(hal_fdcan_handle_t *hfdcan)

HAL FDCAN stop.

HAL1

HAL2

HAL_FDCAN_Stop(FDCAN_HandleTypeDef *hfdcan)
HAL_FDCAN_Stop(hal_fdcan_handle_t *hfdcan)

HAL FDCAN enables TT (Time-Triggered) notifications.

HAL1

HAL2

HAL_FDCAN_TT_ActivateNotification()
Removed: TTCAN not supported in HAL2

HAL FDCAN configures TT external synchronization phase.

HAL1

HAL2

HAL_FDCAN_TT_ConfigExternalSyncPhase()
Removed: TTCAN not supported in HAL2

HAL FDCAN configures TT interrupt lines.

HAL1

HAL2

HAL_FDCAN_TT_ConfigInterruptLines()
Removed: TTCAN not supported in HAL2

HAL FDCAN configures TT operation mode.

HAL1

HAL2

HAL_FDCAN_TT_ConfigOperation()
Removed: TTCAN not supported in HAL2

HAL FDCAN configures TT reference message.

HAL1

HAL2

HAL_FDCAN_TT_ConfigReferenceMessage()
Removed: TTCAN not supported in HAL2

HAL FDCAN configures TT register time mark.

HAL1

HAL2

HAL_FDCAN_TT_ConfigRegisterTimeMark()
Removed: TTCAN not supported in HAL2

HAL FDCAN configures TT stopwatch.

HAL1

HAL2

HAL_FDCAN_TT_ConfigStopWatch()
Removed: TTCAN not supported in HAL2

HAL FDCAN configures TT trigger.

HAL1

HAL2

HAL_FDCAN_TT_ConfigTrigger()
Removed: TTCAN not supported in HAL2

HAL FDCAN disables TT notifications.

HAL1

HAL2

HAL_FDCAN_TT_DeactivateNotification()
Removed: TTCAN not supported in HAL2

HAL FDCAN disables TT external synchronization.

HAL1

HAL2

HAL_FDCAN_TT_DisableExternalSynchronization()
Removed: TTCAN not supported in HAL2

HAL FDCAN disables TT hardware gap control.

HAL1

HAL2

HAL_FDCAN_TT_DisableHardwareGapControl()
Removed: TTCAN not supported in HAL2

HAL FDCAN disables TT register time mark pulse.

HAL1

HAL2

HAL_FDCAN_TT_DisableRegisterTimeMarkPulse()
Removed: TTCAN not supported in HAL2

HAL FDCAN disables TT time mark gap control.

HAL1

HAL2

HAL_FDCAN_TT_DisableTimeMarkGapControl()
Removed: TTCAN not supported in HAL2

HAL FDCAN disables TT trigger time mark pulse.

HAL1

HAL2

HAL_FDCAN_TT_DisableTriggerTimeMarkPulse()
Removed: TTCAN not supported in HAL2

HAL FDCAN enables TT external synchronization.

HAL1

HAL2

HAL_FDCAN_TT_EnableExternalSynchronization()
Removed: TTCAN not supported in HAL2

HAL FDCAN enables TT hardware gap control.

HAL1

HAL2

HAL_FDCAN_TT_EnableHardwareGapControl()
Removed: TTCAN not supported in HAL2

HAL FDCAN enables TT register time mark pulse.

HAL1

HAL2

HAL_FDCAN_TT_EnableRegisterTimeMarkPulse()
Removed: TTCAN not supported in HAL2

HAL FDCAN enables TT time mark gap control.

HAL1

HAL2

HAL_FDCAN_TT_EnableTimeMarkGapControl()
Removed: TTCAN not supported in HAL2

HAL FDCAN enables TT trigger time mark pulse.

HAL1

HAL2

HAL_FDCAN_TT_EnableTriggerTimeMarkPulse()
Removed: TTCAN not supported in HAL2

HAL FDCAN gets the status of TT operation.

HAL1

HAL2

HAL_FDCAN_TT_GetOperationStatus()
Removed: TTCAN not supported in HAL2

HAL FDCAN sets TT clock synchronization.

HAL1

HAL2

HAL_FDCAN_TT_SetClockSynchronization()
Removed: TTCAN not supported in HAL2

HAL FDCAN sets TT end of gap.

HAL1

HAL2

HAL_FDCAN_TT_SetEndOfGap()
Removed: TTCAN not supported in HAL2

HAL FDCAN sets TT global time.

HAL1

HAL2

HAL_FDCAN_TT_SetGlobalTime()
Removed: TTCAN not supported in HAL2

HAL FDCAN sets TT next as gap.

HAL1

HAL2

HAL_FDCAN_TT_SetNextIsGap()
Removed: TTCAN not supported in HAL2